package com.dao;

import com.entity.StudentInfo;
import com.entity.SubjectInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentDao {

    int publish(@Param("userId") Integer userId,@Param("studentName") String studentName,@Param("studentSex") String studentSex,@Param("teachStage") String teachStage, @Param("counselingMethod") String counselingMethod, @Param("cityId") Integer cityId, @Param("locationId") Integer locationId,@Param("adress") String adress, @Param("classTime") String classTime,@Param("subjects") String subjects,@Param("teacherSex") String teacherSex, @Param("salary") String salary, @Param("overview") String overview);

    int addUserSubject(@Param("userId")Integer userId,@Param("subjectId")String subjectId);

    int findPublishCount(@Param("userId") Integer userId);

    StudentInfo findPublish(@Param("userId") Integer userId);

    List<SubjectInfo> findSubject(@Param("userId")Integer userId);

    int deletePublish(@Param("id") Integer id);

    int deleteUserSubject(@Param("userId") Integer userId);

    int deleteAssociation(@Param("userId") Integer userId);

    List<StudentInfo> seekStudent(@Param("cityId")Integer cityId,@Param("locationId") Integer locationId, @Param("subjectId") Integer subjectId,@Param("teachStage") String teachStage, @Param("limit") Integer limit);

    List<StudentInfo> seekStudent2(@Param("cityId")Integer cityId,@Param("locationId")Integer locationId,@Param("teachStage") String teachStage, @Param("limit")Integer limit);

    List<SubjectInfo> findSub(@Param("userId") Integer userId);

    StudentInfo findStudentDetail(@Param("userId")Integer userId);

    int updatePublish(@Param("userId")Integer userId,@Param("studentName") String studentName,@Param("studentSex") String studentSex,@Param("teachStage") String teachStage,@Param("counselingMethod") String counselingMethod, @Param("cityId") Integer cityId, @Param("locationId") Integer locationId,@Param("adress") String adress,@Param("classTime") String classTime,@Param("teacherSex") String teacherSex,@Param("salary") String salary, @Param("overview") String overview);

    int deleteUserSub(@Param("userId") Integer userId);

    int insertSub(@Param("userId")Integer userId, @Param("subId") String subId);

    int findPublishState(@Param("userId") Integer userId);
}
